import Taro, {Component} from '@tarojs/taro'
import {View,Text,Image} from '@tarojs/components'
import Top from './top'
import Activity from './activity'
import './head.scss'

export default class Head extends Component {
    constructor(){
        super(...arguments);
        this.state = {
            store:{
                title:"何贤家",
                notice:"欢迎光临，很高兴为您服务",
                tags:['味道赞','菜品好','分量足']
            }
        }
    }
    render() {
        const {store} = this.state;
        return (
            <View className='head'>
                <Top></Top>
                <Image className='back' src={require('../../assets/img/back.jpg')}></Image>
                <View className='store'>
                    <Image className='store-img' src={require('../../assets/img/back.jpg')}></Image>
                    <View className='store-text'>
                        <View>{store.title}</View>
                        <View>{store.notice}</View>
                        <View>
                            {
                                store.tags.map((item,index)=>{
                                 return  <Text className='tags-text' key={index}>{item}</Text>
                                })
                            }
                        </View>
                    </View>
                </View>
                <Activity></Activity>
            </View>
        )
    }
}
